//
//  Common.swift
//  WLWeibo
//
//  Created by Devil on 16/8/11.
//  Copyright © 2016年 Wiliam. All rights reserved.
//

import UIKit


let WBSWITCHROOTVCNOTIFICATION = "WBSWITCHROOTVCNOTIFICATION"


//微博账号
let WBName = "muqi70595723@163.com"
let WBPassWd = "bbb333"

//微博相关信息
let WBAppKey = "3610701223"
let WBAppSecret = "0b264eadccfdff99249de8a7275d19d4"
let WBRedirect_uri = "http://www.baidu.com"
//屏幕的宽高
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height



//主题颜色
let AppThemeColor = UIColor.orangeColor()

//RGB颜色
func RGB(red:CGFloat, green:CGFloat, blue:CGFloat,alpha:CGFloat = 1) -> UIColor{
    
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: alpha)
    
}

//随机颜色
func RandomColor() -> UIColor{
    
    let r = CGFloat(random()%256)
    let g = CGFloat(random()%256)
    let b = CGFloat(random()%256)
    return RGB(r, green: g, blue: b)
    
    
}

func printLog<T>(message: T, file: String = __FILE__, function: String = __FUNCTION__,line: Int =  __LINE__){
    #if DEBUG
        let newFile = (file as NSString).lastPathComponent
        let result = "\(newFile) [\(line)] \(function) : \(message)"
        print(result)
    #endif
}